<?php
Zend_Loader::loadClass('Zend_Db');

class Lead_Db
{
    
    public static function factory($adapterName, array $config = array())
    {
        if (!is_string($adapterName) or !strlen($adapterName)) {
            throw new Zend_Db_Exception('Adapter name must be specified in a string.');
        }

        $adapterName = strtolower($adapterName); // normalize input
        $adapterName = 'Lead_Db_Adapter_' .
            str_replace(' ', '_' , ucwords(str_replace('_', ' ', $adapterName)));

        Zend_Loader::loadClass($adapterName);

        return new $adapterName($config);
    }
    
    
    
}